<!-- 项目管理 -->
<template>
    <div class="page-box h100 display-flex czbj">
        <p class="title-label mb10">作者列表</p>
        <!-- sonRouter="yybureauFormationBJ" 为跳转新的页面编辑 -->
        <dxtable :dataJson="dataJson" :portUrl="portUrl" :formJson="formJson" :qx="qx" ref="databale"></dxtable>
    </div>
</template>
<script lang='ts' setup>
import dxtable from "../../components/util/dxtable.vue";
import sort from "../../components/util/sort.vue";
import { dxget, dxpost } from "../../util/index";
import { NButton, NImage, NTag } from "naive-ui"
import { h, ref, reactive, render } from "vue";
const databale = ref();
const initeer = () => {
    databale.value.initDataExpose();
};
let jdfds =[
            {
                "label": "足球",
                "value": 1
            },
            {
                "label": "篮球",
                "value": 2
            }
            ,
        ]
        let knxsdfd=[
            {
                "label": "待审核",
                "value": "0"
            },
            {
                "label": "正常",
                "value": "1"
            },
            {
                "label": "冻结",
                "value": "2"
            },
            {
                "label": "已注销",
                "value": "3"
            }
        ]
let dataJson = [
    {
        "title": "作者名称",
        "type": "input",
        "val": "",
        "icon": "dx-shurukuang",
        "span": 12,
        "key": "author_name",
        "width": "",
        "search": true,
        "istable": true,
        "required": false
    },
    {
        "title": "作者头像",
        "type": "img",
        "val": "",
        "icon": "dx-img",
        "span": 12,
        "key": "author_img",
        "width": "",
        "search": false,
        "istable": true,
        "required": false
    },
    {
        "title": "类型",
        "type": "select",
        options:jdfds,
        "val": "",
        "icon": "dx-shurukuang",
        "span": 12,
        "key": "type",
        "width": "",
        "search": true,
        "istable": true,
        "required": false,
        render: (row: any) => {
            return jdfds.filter(a=>a.value==row.type)[0].label
        }
    },
    {
        "title": "手机号码",
        "type": "input",
        "val": "",
        "icon": "dx-shurukuang",
        "span": 12,
        "key": "phone",
        "width": "",
        "search": true,
        "istable": true,
        "required": false
    },
    {
        "title": "状态", 
        "type": "select",
        options:knxsdfd,
        "val": "",
        "icon": "dx-shurukuang",
        "span": 12,
        "key": "status",
        "width": "",
        "search": true,
        "istable": true,
        "required": false,
        render: (row: any) => {
            return knxsdfd.filter(a=>a.value==row.status)[0].label
        }
    },
    {
        "title": "作者签名",
        "type": "input",
        "val": "",
        "icon": "dx-shurukuang",
        "span": 12,
        "key": "sign",
        "width": "",
        "search": false,
        "istable": true,
        "required": false
    },
    // {
    //     "title": "简介",
    //     "type": "textarea",
    //     "val": "",
    //     "icon": "dx-duohangwenben",
    //     "span": 24,
    //     "key": "introduce",
    //     "width": "",
    //     "search": false,
    //     "istable": false,
    //     "required": false
    // },
    {
        "title": "余额",
        "type": "input",
        "val": "",
        "icon": "dx-shurukuang",
        "span": 12,
        "key": "balance",
        "width": "",
        "search": false,
        "istable": true,
        "required": false
    },
    {
        "title": "当天收益",
        "type": "input",
        "val": "",
        "icon": "dx-shurukuang",
        "span": 12,
        "key": "day_amount",
        "width": "",
        "search": false,
        "istable": true,
        "required": false
    },
    {
        "title": "总收益",
        "type": "input",
        "val": "",
        "icon": "dx-shurukuang",
        "span": 12,
        "key": "all_amount",
        "width": "",
        "search": false,
        "istable": true,
        "required": false
    },
    {
        "title": "服务费率%",
        "type": "input",
        "val": "",
        "icon": "dx-shurukuang",
        "span": 12,
        "key": "rate",
        "width": "",
        "search": false,
        "istable": true,
        "required": false
    },
    {
        "title": "粉丝人数",
        "type": "input",
        "val": "",
        "icon": "dx-shurukuang",
        "span": 12,
        "key": "follower_num",
        "width": "",
        "search": false,
        "istable": true,
        "required": false
    },
    {
        "title": "支付宝帐号",
        "type": "input",
        "val": "",
        "icon": "dx-shurukuang",
        "span": 12,
        "key": "zfb_account",
        "width": "",
        "search": false,
        "istable": true,
        "required": false
    },
    {
        "title": "支付宝姓名",
        "type": "input",
        "val": "",
        "icon": "dx-shurukuang",
        "span": 12,
        "key": "zfb_name",
        "width": "",
        "search": false,
        "istable": true,
        "required": false
    },
    {
        "title": "每日提现额度",
        "type": "input",
        "val": "",
        "icon": "dx-shurukuang",
        "span": 12,
        "key": "tx_day_amount",
        "width": "",
        "search": false,
        "istable": true,
        "required": false
    },
    {
        "title": "创建时间",
        "type": "input",
        "val": "",
        "icon": "dx-shurukuang",
        "span": 12,
        "key": "create_time",
        "width": "120",
        "search": false,
        "istable": true,
        "required": false
    },
   
  

];



const qx = {
    DeletePermissionID: "xiaomingaccountdel", //删除
    EditPermissionIdentifier: "xiaomingaccountbj", // 编辑
    NewPermissionIdentifier: "xiaomingaccountxz", // 新建
    ViewPermissionID: "xiaomingaccountck", // 查看
};
const portUrl = "xiaoming/t_author/t_author";

let formJson = reactive([
    {
        "title": "作者名称",
        "type": "input",
        "val": "",
        "icon": "dx-shurukuang",
        "span": 12,
        "key": "author_name",
        "width": "",
        "search": false,
        "istable": true,
        "required": false
    },
    {
        "title": "作者头像",
        "type": "img",
        "val": "",
        "icon": "dx-img",
        "span": 12,
        "key": "author_img",
        "width": "",
        "search": false,
        "istable": true,
        "required": false
    },
    {
        "title": "类型",
        "type": "radio",
        "icon": "dx-radiobox",
        "val": "",
        "opt": [
            {
                "label": "足球",
                "value": 1
            },
            {
                "label": "篮球",
                "value": 2
            }
        ],
        "span": 12,
        "key": "type",
        "width": "",
        "search": false,
        "istable": true,
        "required": false
    },
    {
        "title": "手机号码",
        "type": "input",
        "val": "",
        "icon": "dx-shurukuang",
        "span": 12,
        "key": "phone",
        "width": "",
        "search": false,
        "istable": true,
        "required": false
    },
    {
        "title": "状态11",
        "type": "radio",
        "icon": "dx-radiobox",
        "val": "",
        "opt": [
            {
                "label": "待审核",
                "value": "0"
            },
            {
                "label": "正常",
                "value": "1"
            },
            {
                "label": "冻结",
                "value": "2"
            },
            {
                "label": "已注销",
                "value": "3"
            }
        ],
        "span": 24,
        "key": "status",
        "width": "",
        "search": false,
        "istable": true,
        "required": false
    },
    {
        "title": "作者签名",
        "type": "input",
        "val": "",
        "icon": "dx-shurukuang",
        "span": 12,
        "key": "sign",
        "width": "",
        "search": false,
        "istable": true,
        "required": false
    },
    {
        "title": "简介",
        "type": "textarea",
        "val": "",
        "icon": "dx-duohangwenben",
        "span": 24,
        "key": "introduce",
        "width": "",
        "search": false,
        "istable": false,
        "required": false
    },
    {
        "title": "余额",
        "type": "input",
        "val": "",
        "icon": "dx-shurukuang",
        "span": 12,
        "key": "balance",
        "width": "",
        "search": false,
        "istable": true,
        "required": false
    },
    {
        "title": "当天收益",
        "type": "input",
        "val": "",
        "icon": "dx-shurukuang",
        "span": 12,
        "key": "day_amount",
        "width": "",
        "search": false,
        "istable": true,
        "required": false
    },
    {
        "title": "总收益",
        "type": "input",
        "val": "",
        "icon": "dx-shurukuang",
        "span": 12,
        "key": "all_amount",
        "width": "",
        "search": false,
        "istable": true,
        "required": false
    },
    {
        "title": "服务费率%",
        "type": "input",
        "val": "",
        "icon": "dx-shurukuang",
        "span": 12,
        "key": "rate",
        "width": "",
        "search": false,
        "istable": true,
        "required": false
    },
    {
        "title": "粉丝人数",
        "type": "input",
        "val": "",
        "icon": "dx-shurukuang",
        "span": 12,
        "key": "follower_num",
        "width": "",
        "search": false,
        "istable": true,
        "required": false
    },
    {
        "title": "支付宝帐号",
        "type": "input",
        "val": "",
        "icon": "dx-shurukuang",
        "span": 12,
        "key": "zfb_account",
        "width": "",
        "search": false,
        "istable": true,
        "required": false
    },
    {
        "title": "支付宝姓名",
        "type": "input",
        "val": "",
        "icon": "dx-shurukuang",
        "span": 12,
        "key": "zfb_name",
        "width": "",
        "search": false,
        "istable": true,
        "required": false
    },
    {
        "title": "每日提现额度",
        "type": "input",
        "val": "",
        "icon": "dx-shurukuang",
        "span": 12,
        "key": "tx_day_amount",
        "width": "",
        "search": false,
        "istable": true,
        "required": false
    },
    // {
    //     "title": "创建时间",
    //     "type": "input",
    //     "val": "",
    //     "icon": "dx-shurukuang",
    //     "span": 12,
    //     "key": "create_time",
    //     "width": "",
    //     "search": false,
    //     "istable": true,
    //     "required": false
    // },
   
   
]);
const czFun = {
    fun: (row) => {
        return [
            h(
                NButton,
                {
                    type: "info",
                    quaternary: true,
                    onClick: async (e) => {

                    },
                },
                "复制代码"
            )

        ];
    },
};


// 获取字典内容
// const xtgxxmfl = async () => {
//   const { data }: any = await dxget("dxgjAdmin/getzd", { name: 'xtgxxmfl' })
//   dataJson[2].options = [
//     {
//       label: "全部",
//       value: ""
//     },
//     ...data
//   ]
//   formJson[2].options = data
//   xmlxSelect.value = data
//   console.log(data);
// }
// xtgxxmfl()


</script>
<style scoped></style>